<!DOCTYPE html>
<html>
<head lang="en">
    <title> API Documentation </title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
    <style type="text/css">
        body {
            font-family: 'Roboto', sans-serif;
        }
        .hidden {
            display:none;
        }
        pre {
            outline: 1px solid #ccc;
            padding: 5px; margin: 5px;
        }

        .string { color: green; }
        .number { color: darkorange; }
        .boolean { color: blue; }
        .null { color: magenta; }
        .key { color: red; }

    </style>
    <style type="text/css">
        pre.prettyprint {
            border: 1px solid #ccc;
            margin-bottom: 0;
            padding: 9.5px;
        }
    </style>
    <script>

        function syntaxHighlight(json) {
            json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
            return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
                var cls = 'number';
                if (/^"/.test(match)) {
                    if (/:$/.test(match)) {
                        cls = 'key';
                    } else {
                        cls = 'string';
                    }
                } else if (/true|false/.test(match)) {
                    cls = 'boolean';
                } else if (/null/.test(match)) {
                    cls = 'null';
                }
                return '<span class="' + cls + '">' + match + '</span>';
            });
        }

        function spaceJson(json){
            var validJson = JSON.parse(json);
            return JSON.stringify(validJson, undefined, 4);
        }
    </script>

</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container-fluid">

        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">Gin</a>
            <p class="navbar-text">Developed by Gophers at <a href="http://betacraft.co">Betacraft</a></p>
        </div>


    </div>

</nav>
<div class="container-fluid" style="margin-top: 70px;margin-bottom: 20px;">
    <div class="container-fluid">
    <div class="col-md-4">
        <div class="panel panel-default">
              <div class="panel-heading">Base Urls</div>
              <div class="panel-body">

                    <p>Production : <strong>/api/v1</strong></p>

                    <p>Staging : <strong>/api/v1</strong></p>

              </div>
            </div>
        <ul class="nav nav-pills nav-stacked" role="tablist">

                <li role="presentation"><a href="#0top" role="tab" data-toggle="tab">POST : /api/v1/hostgroup</a></li>

                <li role="presentation"><a href="#1top" role="tab" data-toggle="tab">POST : /api/v1/hostgroup/host</a></li>

                <li role="presentation"><a href="#2top" role="tab" data-toggle="tab">PUT : /api/v1/hostgroup/host</a></li>

                <li role="presentation"><a href="#3top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup/343</a></li>

                <li role="presentation"><a href="#4top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup</a></li>

                <li role="presentation"><a href="#5top" role="tab" data-toggle="tab">DELETE : /api/v1/hostgroup/343</a></li>

                <li role="presentation"><a href="#6top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup/3/template</a></li>

                <li role="presentation"><a href="#7top" role="tab" data-toggle="tab">PUT : /api/v1/hostgroup/template</a></li>

                <li role="presentation"><a href="#8top" role="tab" data-toggle="tab">POST : /api/v1/hostgroup/template</a></li>

        <ul>
    </div>
    <div class="col-md-8 tab-content">

        <div id="0top"  role="tabpanel" class="tab-pane col-md-10">


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td>  application/json</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p> <H4> Request Body </H4> </p>
                <pre id="request-body-0-0" class="prettyprint">{&#34;name&#34;:&#34;testhostgroup&#34;}</pre>
                <script>

                    var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};

                    if (requestHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"name\":\"testhostgroup\"}");
                            document.getElementById('request-body0-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-0-0">{&#34;id&#34;:343,&#34;grp_name&#34;:&#34;testhostgroup&#34;,&#34;create_user&#34;:&#34;root&#34;}</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"id\":343,\"grp_name\":\"testhostgroup\",\"create_user\":\"root\"}");
                            document.getElementById('response-body-0-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>

        </div>

        <div id="1top"  role="tabpanel" class="tab-pane col-md-10">


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td>  application/json</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p> <H4> Request Body </H4> </p>
                <pre id="request-body-1-0" class="prettyprint">{&#34;hosts&#34;:[&#34;testhostgroup&#34;,&#34;agent_test&#34;],&#34;hostgroup_id&#34;:342}</pre>
                <script>

                    var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};

                    if (requestHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"hosts\":[\"testhostgroup\",\"agent_test\"],\"hostgroup_id\":342}");
                            document.getElementById('request-body1-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">417</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-1-0">{&#34;error&#34;:&#34;record not found&#34;}</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"error\":\"record not found\"}");
                            document.getElementById('response-body-1-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td>  application/json</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p> <H4> Request Body </H4> </p>
                <pre id="request-body-1-1" class="prettyprint">{&#34;hosts&#34;:[&#34;testhostgroup&#34;,&#34;agent_test&#34;],&#34;hostgroup_id&#34;:343}</pre>
                <script>

                    var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};

                    if (requestHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"hosts\":[\"testhostgroup\",\"agent_test\"],\"hostgroup_id\":343}");
                            document.getElementById('request-body1-1').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-1-1">{&#34;message&#34;:&#34;[9312 9313] bind to hostgroup: 343&#34;}</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"message\":\"[9312 9313] bind to hostgroup: 343\"}");
                            document.getElementById('response-body-1-1').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>

        </div>

        <div id="2top"  role="tabpanel" class="tab-pane col-md-10">


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td>  application/json</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p> <H4> Request Body </H4> </p>
                <pre id="request-body-2-0" class="prettyprint">{&#34;hostgroup_id&#34;:343,&#34;host_id&#34;:9312}</pre>
                <script>

                    var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};

                    if (requestHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"hostgroup_id\":343,\"host_id\":9312}");
                            document.getElementById('request-body2-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-2-0">{&#34;message&#34;:&#34;unbind host:9312 of hostgroup: 343&#34;}</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"message\":\"unbind host:9312 of hostgroup: 343\"}");
                            document.getElementById('response-body-2-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>

        </div>

        <div id="3top"  role="tabpanel" class="tab-pane col-md-10">


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-3-0">{&#34;hostgroup&#34;:{&#34;id&#34;:343,&#34;grp_name&#34;:&#34;testhostgroup&#34;,&#34;create_user&#34;:&#34;root&#34;},&#34;hosts&#34;:[{&#34;id&#34;:9313,&#34;hostname&#34;:&#34;agent_test&#34;,&#34;ip&#34;:&#34;&#34;,&#34;agent_version&#34;:&#34;&#34;,&#34;plugin_version&#34;:&#34;&#34;,&#34;maintain_begin&#34;:0,&#34;maintain_end&#34;:0}]}</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"hostgroup\":{\"id\":343,\"grp_name\":\"testhostgroup\",\"create_user\":\"root\"},\"hosts\":[{\"id\":9313,\"hostname\":\"agent_test\",\"ip\":\"\",\"agent_version\":\"\",\"plugin_version\":\"\",\"maintain_begin\":0,\"maintain_end\":0}]}");
                            document.getElementById('response-body-3-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>

        </div>

        <div id="4top"  role="tabpanel" class="tab-pane col-md-10">


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-4-0">[{&#34;id&#34;:3,&#34;grp_name&#34;:&#34;hostnameA&#34;,&#34;create_user&#34;:&#34;UserA&#34;},{&#34;id&#34;:5,&#34;grp_name&#34;:&#34;TAI&#34;,&#34;create_user&#34;:&#34;UserB&#34;},{&#34;id&#34;:8,&#34;grp_name&#34;:&#34;ForTestHostG&#34;,&#34;create_user&#34;:&#34;root&#34;}]</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("[{\"id\":3,\"grp_name\":\"hostnameA\",\"create_user\":\"UserA\"},{\"id\":5,\"grp_name\":\"TAI\",\"create_user\":\"UserB\"},{\"id\":8,\"grp_name\":\"ForTestHostG\",\"create_user\":\"root\"}]");
                            document.getElementById('response-body-4-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>



                <p> <H4> URL Params </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>limit</td>
                        <td> 10</td>
                    </tr>

                    <tr>
                        <td>page</td>
                        <td> 1</td>
                    </tr>

                </table>


                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-4-1">[{&#34;id&#34;:3,&#34;grp_name&#34;:&#34;docker-A&#34;,&#34;create_user&#34;:&#34;user-A&#34;},{&#34;id&#34;:5,&#34;grp_name&#34;:&#34;docker-T&#34;,&#34;create_user&#34;:&#34;cheminlin&#34;},{&#34;id&#34;:8,&#34;grp_name&#34;:&#34;docker-F&#34;,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:9,&#34;grp_name&#34;:&#34;docker-B&#34;,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:11,&#34;grp_name&#34;:&#34;docker-D&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:12,&#34;grp_name&#34;:&#34;docker-E&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:14,&#34;grp_name&#34;:&#34;docker-G&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:15,&#34;grp_name&#34;:&#34;docker-G2&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:16,&#34;grp_name&#34;:&#34;docker-H&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:17,&#34;grp_name&#34;:&#34;tools&#34;,&#34;create_user&#34;:&#34;user-C&#34;}]</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("[{\"id\":3,\"grp_name\":\"docker-A\",\"create_user\":\"user-A\"},{\"id\":5,\"grp_name\":\"docker-T\",\"create_user\":\"cheminlin\"},{\"id\":8,\"grp_name\":\"docker-F\",\"create_user\":\"root\"},{\"id\":9,\"grp_name\":\"docker-B\",\"create_user\":\"root\"},{\"id\":11,\"grp_name\":\"docker-D\",\"create_user\":\"user-C\"},{\"id\":12,\"grp_name\":\"docker-E\",\"create_user\":\"user-C\"},{\"id\":14,\"grp_name\":\"docker-G\",\"create_user\":\"user-C\"},{\"id\":15,\"grp_name\":\"docker-G2\",\"create_user\":\"user-C\"},{\"id\":16,\"grp_name\":\"docker-H\",\"create_user\":\"user-C\"},{\"id\":17,\"grp_name\":\"tools\",\"create_user\":\"user-C\"}]");
                            document.getElementById('response-body-4-1').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>

        </div>

        <div id="5top"  role="tabpanel" class="tab-pane col-md-10">


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-5-0">{&#34;message&#34;:&#34;hostgroup:343 has been deleted&#34;}</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"message\":\"hostgroup:343 has been deleted\"}");
                            document.getElementById('response-body-5-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>

        </div>

        <div id="6top"  role="tabpanel" class="tab-pane col-md-10">


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-6-0">{&#34;hostgroup&#34;:{&#34;id&#34;:3,&#34;grp_name&#34;:&#34;hostgroupA&#34;,&#34;create_user&#34;:&#34;root&#34;},&#34;templates&#34;:[{&#34;id&#34;:5,&#34;tpl_name&#34;:&#34;TplA&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:12,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:91,&#34;tpl_name&#34;:&#34;TplB&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:59,&#34;create_user&#34;:&#34;userA&#34;},{&#34;id&#34;:94,&#34;tpl_name&#34;:&#34;TplB&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:62,&#34;create_user&#34;:&#34;userA&#34;},{&#34;id&#34;:103,&#34;tpl_name&#34;:&#34;TplC&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:74,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:104,&#34;tpl_name&#34;:&#34;TplD&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:75,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:105,&#34;tpl_name&#34;:&#34;TplE&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:76,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:116,&#34;tpl_name&#34;:&#34;TplG&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:87,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:125,&#34;tpl_name&#34;:&#34;TplH&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:99,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:126,&#34;tpl_name&#34;:&#34;http&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:100,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:127,&#34;tpl_name&#34;:&#34;TplJ&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:101,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:194,&#34;tpl_name&#34;:&#34;TplK&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:153,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:208,&#34;tpl_name&#34;:&#34;PT_TEST&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:163,&#34;create_user&#34;:&#34;userO&#34;}]}</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"hostgroup\":{\"id\":3,\"grp_name\":\"hostgroupA\",\"create_user\":\"root\"},\"templates\":[{\"id\":5,\"tpl_name\":\"TplA\",\"parent_id\":0,\"action_id\":12,\"create_user\":\"root\"},{\"id\":91,\"tpl_name\":\"TplB\",\"parent_id\":0,\"action_id\":59,\"create_user\":\"userA\"},{\"id\":94,\"tpl_name\":\"TplB\",\"parent_id\":0,\"action_id\":62,\"create_user\":\"userA\"},{\"id\":103,\"tpl_name\":\"TplC\",\"parent_id\":0,\"action_id\":74,\"create_user\":\"root\"},{\"id\":104,\"tpl_name\":\"TplD\",\"parent_id\":0,\"action_id\":75,\"create_user\":\"root\"},{\"id\":105,\"tpl_name\":\"TplE\",\"parent_id\":0,\"action_id\":76,\"create_user\":\"root\"},{\"id\":116,\"tpl_name\":\"TplG\",\"parent_id\":0,\"action_id\":87,\"create_user\":\"root\"},{\"id\":125,\"tpl_name\":\"TplH\",\"parent_id\":0,\"action_id\":99,\"create_user\":\"root\"},{\"id\":126,\"tpl_name\":\"TplI\",\"parent_id\":0,\"action_id\":100,\"create_user\":\"root\"},{\"id\":127,\"tpl_name\":\"TplJ\",\"parent_id\":0,\"action_id\":101,\"create_user\":\"root\"},{\"id\":194,\"tpl_name\":\"TplK\",\"parent_id\":0,\"action_id\":153,\"create_user\":\"root\"},{\"id\":208,\"tpl_name\":\"PT_TEST\",\"parent_id\":0,\"action_id\":163,\"create_user\":\"userO\"}]}");
                            document.getElementById('response-body-6-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>

        </div>

        <div id="7top"  role="tabpanel" class="tab-pane col-md-10">


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td>  application/json</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p> <H4> Request Body </H4> </p>
                <pre id="request-body-7-0" class="prettyprint">{&#34;tpl_id&#34;:5,&#34;grp_id&#34;:3}</pre>
                <script>

                    var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};

                    if (requestHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"tpl_id\":5,\"grp_id\":3}");
                            document.getElementById('request-body7-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-7-0">{&#34;message&#34;:&#34;template: 5 is unbind of HostGroup: 3&#34;}</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"message\":\"template: 5 is unbind of HostGroup: 3\"}");
                            document.getElementById('response-body-7-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>

        </div>

        <div id="8top"  role="tabpanel" class="tab-pane col-md-10">


                <p> <H4> Request Headers </H4> </p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Apitoken</td>
                        <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td>  application/json</td>
                    </tr>

                    <tr>
                        <td>X-Forwarded-For</td>
                        <td>  127.0.0.1</td>
                    </tr>

                </table>




                <p> <H4> Request Body </H4> </p>
                <pre id="request-body-8-0" class="prettyprint">{&#34;tpl_id&#34;:5,&#34;grp_id&#34;:3}</pre>
                <script>

                    var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};

                    if (requestHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"tpl_id\":5,\"grp_id\":3}");
                            document.getElementById('request-body8-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <p><h4> Response Code</h4></p>
                <pre class="prettyprint lang-json">200</pre>

                <p><h4> Response Headers</h4></p>
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>Key</th>
                        <th>Value</th>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Credentials</td>
                        <td> true</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Headers</td>
                        <td> Content-Type, Content-Length, Apitoken</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Methods</td>
                        <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Allow-Origin</td>
                        <td> *</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Expose-Headers</td>
                        <td> Content-Length</td>
                    </tr>

                    <tr>
                        <td>Access-Control-Max-Age</td>
                        <td> 86400</td>
                    </tr>

                    <tr>
                        <td>Content-Type</td>
                        <td> application/json; charset=utf-8</td>
                    </tr>

                </table>


                <p> <H4> Response Body </H4> </p>
                <pre class="prettyprint" id="response-body-8-0">{&#34;grp_id&#34;:3,&#34;tpl_id&#34;:5,&#34;bind_user&#34;:2}</pre>
                <script>

                    var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};

                    if (responseHeader["Content-Type"] === "application/json"){
                        try {
                            var jsonStr = spaceJson("{\"grp_id\":3,\"tpl_id\":5,\"bind_user\":2}");
                            document.getElementById('response-body-8-0').innerHTML = syntaxHighlight(jsonStr);
                        } catch (e) {

                        }
                    }
                </script>

                <hr>

        </div>

    </div>
</div>
</div>
<hr>
</body>
</html>
